package com.example.freemarkdemo.ftpDemo;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: chenhao
 * \* Date: 2021/9/1
 * \* Time: 14:29
 * \* Description:
 * \
 */
import java.io.FileNotFoundException;

/**
 * ftp下载
 */

public class FtpDownMain {
    public static void main(String[] args) throws FileNotFoundException {
        //ftp服务器IP地址
        String ftpHost = "192.168.0.60";
        //ftp服务器端口
        int ftpPort = 21;
        //ftp服务器用户名
        String ftpUserName = "test";
        //ftp服务器密码
        String ftpPassword = "123456";
        //ftp服务器路径
        String ftpPath = "/home/test";
        //本地路径
        String localPath = "H://down";
        //文件名
        String fileName = "downcloud-master.zip";


        //下载
        //将ftp根目录下的文件下载至E盘
       FtpUtil.downloadFtpFile(ftpHost, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName);


    }
}